<template>
  <div class="msviewbodyhead"
       style="padding: 10px 10px 10px 2px;letter-spacing: 1px;font: bold  16px 'Microsoft YaHei';color: rgb(70, 70, 70);display: flex;
    justify-content: space-between;">
    <span class="title"> {{stitle}}</span>
    <van-icon v-if="alldata && alldata.type && alldata.type === '排序表格'" name="arrow" @click="openRank()" />
  </div>
</template>

<script>
  export default {
    name: 'CommonTitle',
    props: ['stitle', 'alldata'],
    mounted() {
      //console.log('index.vue mounted:', this.alldata)
    },
    methods: {
      openRank() {
        this.$router.push({ 
          name: 'rankinglist', 
          query: {
            stitle: this.alldata.title,
          },
          params: { 
            
            alldata: this.alldata
          } 
        });
      }
    }
  }
</script>

<style scoped>

  .title {
    color: rgba(0,0,0,.85);
  }
  .rank-icon {
    
  }
</style>
